<div id='actions'>
  <h2><%= t('.details')%></h2>
  <p>
    <strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@inquiry.created_at) %>
  </p>
  <% if @inquiry.spam? %>
    <p>
      <strong><%= t('.spam') %>:</strong> <%= t('.spam_yes') %>
    </p>
  <% end %>
  <h2><%= t('.actions') %></h2>
  <ul>
    <li>
      <%= link_to t('.back_to_all_inquiries'), {:action => 'index'}, :class => "back_icon" %>
    </li>
    <li>
      <%= link_to t('admin.inquiries.delete'),
                  admin_product_inquiry_url(@inquiry),
                  :class => 'delete_icon no-tooltip confirm-delete',
                  :title => t('admin.inquiries.delete'),
                  :confirm => t('shared.admin.delete.message', :title => @inquiry.name),
                  :method => :delete %>
    </li>
  </ul>
</div>
<div id='records'>
  <h2><%= t('.inquiry') %></h2>
  <table id='inquiry'>
    <tr>
      <td>
        <strong><%= t('.to') %></strong>
      </td>
      <td>
        <%= RefinerySetting[:site_name] %>
      </td>
    </tr>
    <tr>
      <td>
        <strong><%= t('.from') %></strong>
      </td>
      <td>
        <%= @inquiry.name %> [<%= mail_to @inquiry.email, @inquiry.email, {:title => t('.click_to_email')} %>]
      </td>
    </tr>
    <% if @inquiry.product.present? %>
      <tr>
        <td>
          <strong>Product</strong>
        </td>
        <td>
          <%= @inquiry.product.name %>
        </td>
      </tr>
    <% end %>
    <% unless @inquiry.phone.blank? %>
      <tr>
        <td>
          <strong><%= t('.phone') %></strong>
        </td>
        <td>
          <%= @inquiry.phone %>
        </td>
      </tr>
    <% end %>
    <tr>
      <td>
        <strong><%= t('.date') %></strong>
      </td>
      <td>
        <%= l(Date.parse(@inquiry.created_at.to_s), :format => :long) %>
      </td>
    </tr>
    <tr>
      <td valign='top'>
        <strong><%= t('.message') %></strong>
      </td>
      <td>
        <%= simple_format @inquiry.message, :style => 'margin-top: 0' %>
      </td>
    </tr>
  </table>
</div>
